package main

import (
	"fmt"
	"math/rand"
	"time"
)

// 生成 max 以内的随机数
func randNum(max int32) int32 {
	sec := time.Now().Unix()
	rand.Seed(sec)
	return rand.Int31n(max)
}

func fizzBuzz() {
	for i := 0; i < 100; i++ {
		switch {
		case i%3 == 0 && i%5 == 0:
			fmt.Println("bizzBuzz")
		case i%3 == 0:
			fmt.Println("bizz")
		case i%5 == 0:
			fmt.Println("buzz")
		default:
			fmt.Println(i)
		}
	}
}

func main() {
	num := randNum(10)

	switch num {
	case 1:
		fmt.Println("one...")
	case 2:
		fmt.Println("two...")
	default:
		fmt.Println("other", num)
	}

	fizzBuzz()
}
